﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SearcheAndReports.master" AutoEventWireup="true"
    CodeBehind="FullOrder.aspx.cs" Inherits="SCFHS.Views.Searchs.FullOrder" %>

<asp:Content ID="Content1" ContentPlaceHolderID="NastedHead" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#Search").addClass("createOrderMenuactive");

            $('.collapse').hide();

            $(".expander").click(function () {
                $('.collapse').hide();
                $(this).parent().parent().find(".collapse").toggle();
                return false;
            });
        });

        function OpenFile(ths) {
            var Filename = '<%= ResolveUrl(ConfigurationManager.AppSettings["UploadPath"].ToString()) %>';
            Filename = Filename + '/' + ths.innerText;
            window.open(Filename, '_blank');
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NastedBody" runat="server">
    <asp:HiddenField ID="hdfOrderNo" runat="server" />
    <div>
        <asp:Label Text=" " runat="server" ID="lblMessage" class="info" />
    </div>
    <div id="MainInfo" class="Box radius">
        <div class="BoxTitle radius">
            البيانات الأساسية
        </div>
        <div class="subContent">
            <div class="row">
                <ul class="title">
                    <li>الإسم</li>
                </ul>
                <ul class="data">
                    <li>
                        <asp:TextBox ID="txtpersonName" runat="server" Width="265px" Font-Size="20px" TabIndex="1"
                            disabled="disabled" MaxLength="80" /><asp:RequiredFieldValidator ID="RequiredFieldValidator2"
                                ErrorMessage="يجب إدخال إسم صاحب الطلب اولا" ControlToValidate="txtPersonName"
                                runat="server" Text="*" ForeColor="Red" ValidationGroup="OrderMainDetails" /></li>
                </ul>
                <ul class="title">
                    <li>الرقم</li>
                </ul>
                <ul class="data">
                    <li>
                        <asp:TextBox ID="txtOrderNumber" runat="server" Width="100px" TabIndex="1" disabled="disabled"
                            CssClass="ltrNumbers" MaxLength="20" /><asp:RequiredFieldValidator ID="RequiredFieldValidator5"
                                ErrorMessage="يجب إدخال رقم الطلب" ControlToValidate="txtOrderNumber" runat="server"
                                Text="*" ForeColor="Red" ValidationGroup="OrderMainDetails" /></li>
                </ul>
                <ul class="title">
                    <li>التاريخ</li>
                </ul>
                <ul class="data">
                    <li>
                        <asp:TextBox ID="txtDate" runat="server" Width="100px" TabIndex="2" disabled="disabled" /></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="row Box radius-Bottom">
        <div class="ContentTitle " style="width: 888px;">
            ◄ ملخص عمليات الطلب
        </div>
        <div class="row">
            <div class="row">
                <ul class="title">
                    <li>مرحلة الطلب الحالية</li>
                </ul>
                <ul class="data">
                    <li>
                        <asp:Label Text=" " ID="lblCurrentOrderState" runat="server" /><asp:HiddenField ID="hdfCurrentOrderState"
                            Value="" runat="server" />
                    </li>
                </ul>
                <ul class="title">
                    <li>تعديل مرحلة الطلب</li>
                </ul>
                <ul class="data">
                    <li>
                        <asp:DropDownList runat="server" ID="drpOrderState" OnDataBound="drpOrderState_DataBound">
                        </asp:DropDownList>
                    </li>
                </ul>
                <ul class="data">
                    <li>
                        <asp:Button Text="تحديث مرحلة الطلب" runat="server" ID="btnUpdateOrderState" OnClick="btnUpdateOrderState_Click"
                            CssClass="button" /></li>
                </ul>
                <ul class="data">
                    <li>
                        <asp:Button Text="إغلاق الطلب" runat="server" ID="btnClosrOrder" OnClick="btnClosrOrder_Click"
                            CssClass="button" /></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="OrderFullInfo Box radius-Bottom" runat="server" id="dvFullInfo" runat="server">
        <div class="ContentTitle" style="width: 888px; overflow: hidden;">
            <a href="#" class="expander">◄ بيانات الطلب</a>
        </div>
        <div class="row collapse" style="padding: 10px 30px;">
            <div style="white-space: nowrap;">
                <div class="col">
                    <ul class="title">
                        <li class="Alter">الموضوع</li>
                        <li>الجنسية</li>
                        <li class="Alter">بلد الإقامة <span>(الحالي)</span></li>
                        <li class="heightRow">الهوية</li>
                        <li>&nbsp;</li>
                    </ul>
                    <ul class="data" style="width: 260px;">
                        <li class="Alter">
                            <asp:TextBox ID="txtSubject" runat="server" ValidationGroup="UpdateFull" MaxLength="100"
                                ReadOnly="true" /></li>
                        <li>
                            <asp:DropDownList ID="drpNationality" runat="server" Width="150" ValidationGroup="UpdateFull"
                                Enabled="false">
                            </asp:DropDownList>
                        </li>
                        <li class="Alter">
                            <asp:DropDownList ID="drpCurrenCity" runat="server" Width="150" ValidationGroup="UpdateFull"
                                Enabled="false">
                            </asp:DropDownList>
                        </li>
                        <li class="heightRow">
                            <div class="subLi">
                                <asp:TextBox ID="txtIDNumber" runat="server" ValidationGroup="UpdateFull" MaxLength="10"
                                    CssClass="ltrNumbers" ReadOnly="true" /></div>
                            <div class="hradio">
                                <asp:RadioButtonList ID="rdIDType" runat="server" RepeatDirection="Vertical" ValidationGroup="UpdateFull"
                                    Enabled="false">
                                    <asp:ListItem Text="بطاقة/إقامة" Value="0" />
                                    <asp:ListItem Text="جواز سفر" Value="1" />
                                </asp:RadioButtonList>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="col">
                    <ul class="title" style="width: 140px;">
                        <li class="Alter">رقم التصنيف</li>
                        <li>مكان الميلاد</li>
                        <li class="Alter">مكان الحصول على الثانوية</li>
                        <li class="heightRow">جهة العمل</li>
                        <li>&nbsp;</li>
                    </ul>
                    <ul class="data" style="width: 220px;">
                        <li class="Alter">
                            <asp:TextBox ID="txtClass" runat="server" ValidationGroup="UpdateFull" MaxLength="20"
                                CssClass="ltrNumbers" ReadOnly="true" /></li>
                        <li>
                            <asp:RadioButtonList ID="rdBirthPlace" runat="server" RepeatDirection="Horizontal"
                                ValidationGroup="UpdateFull" Enabled="false">
                                <asp:ListItem Text="داخل السعودية" Value="0" />
                                <asp:ListItem Text="خارج السعودية" Value="1" />
                            </asp:RadioButtonList>
                        </li>
                        <li class="Alter">
                            <asp:RadioButtonList ID="rdSecondrySchool" runat="server" RepeatDirection="Horizontal"
                                ValidationGroup="UpdateFull" Enabled="false">
                                <asp:ListItem Text="داخل السعودية" Value="0" />
                                <asp:ListItem Text="خارج السعودية" Value="1" />
                            </asp:RadioButtonList>
                        </li>
                        <li class="heightRow">
                            <div class="subLi">
                                <asp:TextBox ID="txtWorkPlace" runat="server" ValidationGroup="UpdateFull" MaxLength="80"
                                    ReadOnly="true" />
                            </div>
                            <div class="hradio">
                                <asp:RadioButtonList ID="rdWorkType" runat="server" RepeatDirection="Vertical" ValidationGroup="UpdateFull"
                                    Enabled="false">
                                    <asp:ListItem Text="حكومي" Value="0" />
                                    <asp:ListItem Text="أهلي" Value="1" />
                                </asp:RadioButtonList>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div id="OrderAttachmentFiles" class="Box radius-Bottom" runat="server">
        <div class="ContentTitle " style="width: 888px; overflow: hidden;">
            <a href="#" class="expander">◄ المرفقات</a>
        </div>
        <div class="row AttachContent collapse">
            <div id="Div1" class="row">
                <div class="row">
                    <asp:GridView runat="server" ID="grdAttachmentFiles" AutoGenerateColumns="False"
                        CellPadding="4" ForeColor="#333333" GridLines="Both" BorderWidth="2" DataKeyNames="ID">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="م">
                                <ItemTemplate>
                                    <div style="width: 19px; text-align: center">
                                        <%#Container.DataItemIndex+1 %>
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="الملــفات">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lblAttachmentPoint" Text='<%# Eval("AttachmentPath")%>' runat="server"
                                        Width="300" OnClientClick="return OpenFile(this)"></asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle Width="450px" HorizontalAlign="Right" />
                            </asp:TemplateField>
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <EmptyDataTemplate>
                            <asp:Label ID="Label1" Text=" لم يتم رفع مرفقات للطلب" runat="server" Width="500px" />
                        </EmptyDataTemplate>
                        <EmptyDataRowStyle ForeColor="Black" Font-Bold="true" BorderStyle="None" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#056796" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </div>
            </div>
        </div>
    </div>
    <div id="OrderSummery" class="Box  radius-Bottom" runat="server">
        <div class="ContentTitle " style="width: 888px; overflow: hidden;">
            <a href="#" class="expander">◄ عرض و تلخيص الطلب</a>
        </div>
        <div class="BoxContent collapse">
            <div class="row" style="padding-top: 5px; max-height: 200px; overflow: auto; width: 515px;">
                <asp:GridView runat="server" ID="grdSummery" AutoGenerateColumns="False" CellPadding="4"
                    ForeColor="#333333" GridLines="Both" BorderWidth="2" DataKeyNames="ID">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="م">
                            <ItemTemplate>
                                <div style="width: 19px; text-align: center">
                                    <%#Container.DataItemIndex+1 %>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="النقاط">
                            <ItemTemplate>
                                <div style="width: 368px;">
                                    <%# Eval("Point") %>
                                </div>
                            </ItemTemplate>
                            <ItemStyle Width="450px" HorizontalAlign="Right" />
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <asp:Label ID="Label1" Text="لم يتم إضافة أي عناصر من قبل" runat="server" Width="500px" />
                    </EmptyDataTemplate>
                    <EmptyDataRowStyle ForeColor="White" Font-Bold="true" BorderStyle="None" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#056796" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
            </div>
        </div>
    </div>
    <div id="OrderRequest" class="Box  radius-Bottom" runat="server">
        <div class="ContentTitle " style="width: 888px; overflow: hidden;">
            <a href="#" class="expander">◄ يرغب صاحب الطلب</a>
        </div>
        <div class=" BoxContent collapse">
            <div class="row" style="padding-top: 5px; max-height: 200px; overflow: auto; width: 515px;">
                <asp:GridView runat="server" ID="grdRequest" AutoGenerateColumns="False" CellPadding="4"
                    ForeColor="#333333" GridLines="Both" BorderWidth="2" DataKeyNames="ID">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="م">
                            <ItemTemplate>
                                <div style="width: 19px; text-align: center">
                                    <%# Container.DataItemIndex+1 %>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="النقاط">
                            <ItemTemplate>
                                <div style="width: 368px;">
                                    <%# Eval("Point") %>
                                </div>
                            </ItemTemplate>
                            <ItemStyle Width="450" HorizontalAlign="Right" />
                        </asp:TemplateField>
                    </Columns>
                    <EditRowStyle BackColor="#2461BF" />
                    <EmptyDataTemplate>
                        <asp:Label ID="Label1" Text="لم يتم إضافة أي عناصر من قبل" runat="server" Width="500px" />
                    </EmptyDataTemplate>
                    <EmptyDataRowStyle ForeColor="White" Font-Bold="true" BorderStyle="None" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#056796" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
            </div>
        </div>
    </div>
    <div id="OrderAttachmens" class="Box radius-Bottom" runat="server">
        <div class="ContentTitle" style="width: 888px; overflow: hidden;">
            <a href="#" class="expander">◄ وصف المرفقات</a>
        </div>
        <div id="AttachContent" class=" BoxContent row collapse" style="padding-right: 2px;">
            <div class="row" style="padding-top: 5px; max-height: 200px; overflow: auto; width: 515px;">
                <asp:GridView runat="server" ID="grdAttachments" AutoGenerateColumns="False" CellPadding="4"
                    ForeColor="#333333" GridLines="Both" BorderWidth="2" DataKeyNames="ID">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="م">
                            <ItemTemplate>
                                <div style="width: 19px; text-align: center">
                                    <%# Container.DataItemIndex+1 %>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="النقاط">
                            <ItemTemplate>
                                <%# Eval("Point") %>
                            </ItemTemplate>
                            <ItemStyle Width="450px" HorizontalAlign="Right" />
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <asp:Label ID="Label1" Text="لم يتم إضافة أي عناصر من قبل" runat="server" Width="500px" />
                    </EmptyDataTemplate>
                    <EmptyDataRowStyle ForeColor="White" Font-Bold="true" BorderStyle="None" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#056796" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
            </div>
        </div>
    </div>
    <div id="OrderInstructions" class="Box radius-Bottom" runat="server">
        <div class="ContentTitle expander" style="width: 888px; overflow: hidden;">
            <a href="#" class="expander">◄ التوجيه و المتابعة</a>
        </div>
        <div class="collapse" style="padding: 10px 15px;">
            <div>
                <asp:Repeater runat="server" ID="rptFollowupdCatalog">
                    <ItemTemplate>
                        <div class="followupCatalogRow" style="width: 850px;">
                            <asp:Panel ID="Panel1" runat="server" Visible='<%# Eval("Type").ToString()=="Instruction" ? false : true%>'>
                                <div id="OrderFollowUp" class="Box">
                                    <div class="ContentTitle">
                                        متابعة
                                    </div>
                                    <div class="followupContent">
                                        <div class="followupRow">
                                            <ul class="title">
                                                <li style="width: 90px">الجهة</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:Label runat="server" ID="txtFollowUpAuth" Width="280" Text='<%# Eval("FollowUpAuthority") %>'></asp:Label></li>
                                            </ul>
                                            <ul class="title">
                                                <li>رقم المعاملة</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:Label runat="server" ID="txtSquNumber" Width="80" Text='<%# Eval("FollowUpSequenceNumber") %>'></asp:Label></li>
                                            </ul>
                                        </div>
                                        <div class="followupRow followupDisc">
                                            <ul class="title">
                                                <li style="width: 90px">التوجية</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:TextBox runat="server" ID="txtFollowupDiscrip" TextMode="MultiLine" Enabled="false"
                                                        Text='<%# Eval("FollowUpDiscription") %>' Width="430" /></li>
                                            </ul>
                                        </div>
                                        <div class="followupRow">
                                            <ul class="title">
                                                <li style="width: 90px">الإسم</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:Label runat="server" ID="txtFollowerName" Width="280" Text='<%# Eval("FollowerName") %>'></asp:Label></li>
                                            </ul>
                                            <ul class="title">
                                                <li style="width: 60px">التاريخ</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:Label runat="server" ID="txtFollowupDate" Width="80" Text='<%# Eval("FollowUpDate", "{0:d}") %>' /></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                            <asp:Panel ID="Panel2" runat="server" Visible='<%# Eval("Type").ToString()=="Instruction" ? true : false%>'>
                                <div id="OrderInstructions" class="Box">
                                    <div class="ContentTitle">
                                        توجية
                                    </div>
                                    <div class="InstructionContent">
                                        <div id="AuthorityOf" class="row">
                                            <ul class="title">
                                                <li>صاحب الصلاحية</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:Label ID="Label2" runat="server" Width="250px" Font-Size="12" Text='<%# Eval("AuthorityOf") %>' /></li>
                                            </ul>
                                            <ul class="title">
                                                <li>التاريخ</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("SubmitTimestamp","{0:d}") %>'></asp:Label></li>
                                            </ul>
                                        </div>
                                        <center>
                                            <div class="authContainer">
                                            </div>
                                        </center>
                                        <div id="Instruction" class="row" style="height: 70px;">
                                            <ul class="title">
                                                <li>التوجية</li>
                                            </ul>
                                            <ul class="data">
                                                <li>
                                                    <asp:TextBox runat="server" TextMode="MultiLine" ID="txtInstruction" Width="430"
                                                        Text='<%# Eval("Instruction") %>' Enabled="false"></asp:TextBox>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                            <div style="overflow: hidden; height: 3px;">
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
                .
            </div>
        </div>
    </div>
</asp:Content>
